<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>微分销自媒体平台</title>
    <link th:href="@{/css/bootstrap.css}" rel="stylesheet">
</head>
<body>

<div>
    <table width="100%" border="0" cellspacing="6" cellpadding="0" class="table table-striped table-bordered">
        <tbody>
        <tr valign="top">
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="6"
                       class="table table-striped table-bordered">
                    <tbody>
                    <tr>
                        <td valign="middle" class="blockTd">
                            <img th:src="@{img/icon012a6.gif}">
                            订单列表
                            <input type="hidden" id="RelaCatalogID" name="RelaCatalogID" value="0">
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-top: 0px; padding-left: 6px; padding-right: 6px; padding-bottom: 8px;">
                            <table width="100%" cellpadding="2" cellspacing="0" class="dataTable" sortstring="" id="dg1"
                                   page="true" size="0" multiselect="true" autofill="true" scroll="false" lazy="false"
                                   cachesize="0">
                                <tbody>
                                <tr ztype="head" class="dataTableHead">
                                    <td width="5%" align="center">
                                        序 号
                                    </td>
                                    <td align="center" width="10%">
                                        <b>订单号</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>买家姓名</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>买家手机号</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>商品名称</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>购买数量</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>留言</b>
                                    </td>
                                    <td align="center" width="10%">
                                        <b>支付状态</b>
                                    </td>
                                    <td align="center" width="15%">
                                        <b>创建时间</b>
                                    </td>
                                    <td align="center" width="15%">
                                        <b>操作</b>
                                    </td>
                                </tr>
                                <tr th:each="order, var : ${orderList}">
                                    <td align="center" th:text="${var.count}"></td>
                                    <td align="center" th:text="${order.number}"></td>
                                    <td align="center" th:text="${order.buyername}"></td>
                                    <td align="center" th:text="${order.phone}"></td>
                                    <td align="center" th:text="${order.goodsName}"></td>
                                    <td align="center" th:text="${order.num}"></td>
                                    <td align="center" th:text="${order.remark}"></td>
                                    <td align="center">
                                        <span style="color:blue" th:if="${order.payStatus == 0}">待支付</span>
                                        <span style="color:green" th:if="${order.payStatus == 1}">已支付</span>
                                        <span style="color:green" th:if="${order.payStatus == 2}">放弃支付</span>
                                    </td>
                                    <td align="center"
                                        th:text="${#dates.format(order.createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                                    <td align="center">
                                        <a th:if="${order.payStatus == 0}" onclick="pay(this)" th:data="${order.id}"
                                           href="javascript:void(0);"
                                           class="zPushBtn">
                                            <img th:src="@{/img/icon003a3.gif}"><b>支付</b>
                                        </a>&nbsp;
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        </tbody>
    </table>
</div>

<script th:src="@{/js/jquery.js}"></script>
<script th:src="@{/js/bootstrap.js}"></script>

<script type="text/javascript">
    function pay(self) {
        var id = $(self).attr("data");
        reload(base + "order/wxpay?orderId=" + id);
    }
</script>

</body>
</html>